Your Bridge Read Me

The default freighter bridge is dark and cluttered, which maybe suits some local system ore mining vessels, but is woefully inadequate for a trans-galactic starship! Enter JJs Bridge, an open bridge with full glass panels befitting a true galactic traveller. It was fantastic...

Until Prisms broke it. And JJ has moved on to bigger and better things. So...

Here you go, JJs bridge fixed and reworked into Your Bridge, a bridge you can modify to your own liking.

The idea behind this mod is not to just give you a new bridge, but to give you the tools and know-how to make your own bridge. The original bridge on freighters is basically a round room with a bunch of models inside so if you delete all the clutter and change the panel walls to glass, you will have an open bridge. However, there is a slight problem: there doesn't appear to be any outside hull models visible from the bridge view so when the bridge has windows facing backward, you will be able to see straight into the back of your freighter which is immersion-breaking. (Since the original had no back windows, I guess there was no need for a hull model from the bridge.) To fix this, I added a rudimentary hull to the view. 

Currently, the bridge has the helm from Nada's Room, the orignal wallmonitors and tables, the center sphere/ball thing, 4 wall drapes that change periodically and 6 npcs scattered around the room. In addition, on the right back wall, there is a ladder*. You can add terminals and portable stuff, whatever you could on the normal bridge, immediately without adding anything to the code.

*The ladder serves 2 purposes: 1, to allow you to climb up and out of the bridge and walk around outside on the hull and roof of the bridge (I enjoy the view from here so I seem to do this often), and 2, if you save using the portable save on the bridge, you will sometimes get an invisible wall glitch as you enter and exit the bridge. Climbing on and off the ladder without going outside seems to fix this without the need to move your ship or save down in the hangar with your starship.

Files modified:
BRIDGE.SCENE - a short reference file to the new bridge file
MAINROOM.SCENE - the walls, roof and floor of the bridge - the material of the snap panels was changed from default panel to panel glass
NPCS.SCENE - position of npcs in the bridge

files added:
YOURBRIDGE.SCENE - new bridge with the actual layout and elements of the bridge
BACKWALL.SCENE - the bridge entrance 


how to make your own edits to this mod

In order to modify files in the game, you will need to first unpack the game's MBIN files. You will need NMS Modding Station for this (guide below). Once the files are unpacked, they are simple EXML files that you can easily modify, change the parameters, then recompile, pack your mod, and its ready to go. You can add parts to the bridge, even from other parts of the game (for example, the helm on this bridge is from Nada's Room on the Anomaly) if you can find the model.   


1. get nms modding station and MBIN compiler (needs to be latest version as it changes with every update)
2. set up modding station in the settings (choose default folders and where the mbin exe is)
3. put the _yourbridge.pak in its own folder and then set that as current project
4. open that folder in nms modding station and then double click on the _yourbridge.pak. the folders of the mod will be extracted
5. open one of the folders and you will see some mbin files. simply double click on these and it will generate an exml file. 
6. open the exml file in notepad++, edit it, then save.*
7. return to nms mod station, find the exml file you just edited, right click and and choose recompile.
8. right click anywhere in the nms mod station window and choose "pack mod."
9. When the mod is packed, it will show the pak file. right click on this and choose "copy to mods folder"
10. run the game to see your changes.

to add models from parts of the game, figure out which model you want to use (for this you will have to be a sleuth in the game files), then copy the code below changing the value under SCENEGRAPH to the folder and mbin file that holds your model. Change the settings indicated and then recompile, pak the new version with the change, and test.
        
        <Property value="TkSceneNodeData.xml">
          <Property name="Name" value="Stair1" /> *************(any name you want)*************
          <Property name="NameHash" value="0" /> **********************(0 works here for your own additions)**************
          <Property name="Type" value="REFERENCE" />
          <Property name="Transform" value="TkTransformData.xml">
            <Property name="TransX" value="-5" /> ************(Trans, position; Rot, rotate; Scale, size)*********
            <Property name="TransY" value="0" />
            <Property name="TransZ" value="5" />
            <Property name="RotX" value="0" />
            <Property name="RotY" value="0" />
            <Property name="RotZ" value="0" />
            <Property name="ScaleX" value="1" />
            <Property name="ScaleY" value="1" />
            <Property name="ScaleZ" value="1" />
          </Property>
          <Property name="Attributes">
            <Property value="TkSceneNodeAttributeData.xml">
              <Property name="Name" value="SCENEGRAPH" />
              <Property name="AltID" value="" />
              <Property name="Value" value="MODELS\PLANETS\BIOMES\COMMON\BUILDINGS\TRADINGPOST\PARTS\LADDER.SCENE.MBIN" /> **********(path of the element you want to add)**** 
            </Property>
          </Property>
          <Property name="Children" />
        </Property>

If you need a simple collision to stop you passing through objects (for example, the whole bridge scene has many collisions which are unnamed and only referenced by location so rather than check them all, I just made a couple of simple collions for the helm), just add the following code to YOURBRIDGE.EXML and recompile. Placement of collisions is simialr to models and the code looks like:


        <Property value="TkSceneNodeData.xml">
          <Property name="Name" value="RearSideCollision1" />
          <Property name="NameHash" value="0" />
          <Property name="Type" value="COLLISION" />
          <Property name="Transform" value="TkTransformData.xml">
            <Property name="TransX" value="5" />
            <Property name="TransY" value="1.85" />
            <Property name="TransZ" value="14.5" />
            <Property name="RotX" value="45" />
            <Property name="RotY" value="0" />
            <Property name="RotZ" value="0" />
            <Property name="ScaleX" value="1" />
            <Property name="ScaleY" value="1" />
            <Property name="ScaleZ" value="1" />
          </Property>
          <Property name="Attributes">
            <Property value="TkSceneNodeAttributeData.xml">
              <Property name="Name" value="TYPE" />
              <Property name="AltID" value="" />
              <Property name="Value" value="Box" />********there are different types like cylinder, box, sphere maybe, i didn't look into this too deeply**********************
            </Property>
            <Property value="TkSceneNodeAttributeData.xml">
              <Property name="Name" value="WIDTH" />
              <Property name="AltID" value="" />
              <Property name="Value" value="5" />
            </Property>
            <Property value="TkSceneNodeAttributeData.xml">
              <Property name="Name" value="HEIGHT" />
              <Property name="AltID" value="" />
              <Property name="Value" value="8" />
            </Property>
            <Property value="TkSceneNodeAttributeData.xml">
              <Property name="Name" value="DEPTH" />
              <Property name="AltID" value="" />
              <Property name="Value" value="1" />
            </Property>
          </Property>
          <Property name="Children" />
        </Property>
		
Note: If you have messed up with too many or too few property tags, nms mod station will not compile the file but will not give you a notice.

The orientation of the bridge for the most part has it's 0 at the center where x is left (-) and right (+), z is back (-) and forth (+) and y is up (+) and down (-). Some elements take the bridge entrance as 0.

